package lp.xian.equipment.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.domain.Supplier;
import lombok.Data;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 财务数据对象 lp_finance
 *
 * @author ruoyi
 * @date 2023-06-30
 */
@Data
public class Finance extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键递增 */
    private Integer financeId;

    /** 财务数据名称 */
    @Excel(name = "财务数据名称")
    private String financeName;

    /** 财务数据名称 */
    @Excel(name = "订单编号")
    private String financeOrderNo;


    /** 财务数据内容 */
    @Excel(name = "财务数据内容")
    private String financeContent;

    /** 发生金额 */
    @Excel(name = "发生金额")
    private BigDecimal financeMoney;

    /** 余额 */
    @Excel(name = "余额")
    private BigDecimal financeBalance;

    /** 供应商id */
    @Excel(name = "供应商id")
    private Integer supplierId;

    @Excel(name = "客户id")
    private Integer clientId;


    /** 收入/支出 */
    @Excel(name = "收入/支出")
    private Integer financeStatus;

    /** 审核状态 */
    @Excel(name = "审核状态")
    private Integer auditStatus;

    /** 审核意见 */
    @Excel(name = "审核意见")
    private String auditOpinion;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    /** 审核人员 */
    @Excel(name = "审核人员")
    private String auditPerson;

    /** 审批意见 */
    @Excel(name = "审批意见")
    private String approverOpinion;

    /**  审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = " 审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date approverTime;

    /** 审批人员 */
    @Excel(name = "审批人员")
    private String approverPerson;

//    private Client client;
    private Supplier supplier;




    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("financeId", getFinanceId())
                .append("financeOrderNo", getFinanceOrderNo())
                .append("financeName", getFinanceName())
                .append("financeContent", getFinanceContent())
                .append("financeMoney", getFinanceMoney())
                .append("financeBalance", getFinanceBalance())
                .append("supplierId", getSupplierId())
                .append("clientId", getClientId())
                .append("financeStatus", getFinanceStatus())
                .append("auditStatus", getAuditStatus())
                .append("auditOpinion", getAuditOpinion())
                .append("auditTime", getAuditTime())
                .append("auditPerson", getAuditPerson())
                .append("approverOpinion", getApproverOpinion())
                .append("approverTime", getApproverTime())
                .append("approverPerson", getApproverPerson())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
